<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  
  <title>iview之Modal(render详解) | </title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="EricWang's Blog">
  
  <meta name="description" content="&amp;#x524D;&amp;#x8A00; &amp;#x5148;&amp;#x6765;&amp;#x8BF4;&amp;#x4E00;&amp;#x8BF4;&amp;#x9700;&amp;#x6C42;&amp;#x5427;&amp;#xFF01;   &amp;#x5728;&amp;#x4F7F;&amp;#x7528;iview&amp;#x4E2D;&amp;#x7684;Modal&amp;#x7EC4;&amp;#x4EF6;&amp;#x65F6;&amp;#xFF0C;&amp;#x6709;&amp;#x4E00;&amp;#x4E2A;&amp;#">
<meta name="keywords" content="iview,Modal,Render">
<meta property="og:type" content="article">
<meta property="og:title" content="iview之Modal(render详解)">
<meta property="og:url" content="https://bigbigdreamer.github.io/b3f9b7dd.html">
<meta property="og:site_name">
<meta property="og:description" content="&amp;#x524D;&amp;#x8A00; &amp;#x5148;&amp;#x6765;&amp;#x8BF4;&amp;#x4E00;&amp;#x8BF4;&amp;#x9700;&amp;#x6C42;&amp;#x5427;&amp;#xFF01;   &amp;#x5728;&amp;#x4F7F;&amp;#x7528;iview&amp;#x4E2D;&amp;#x7684;Modal&amp;#x7EC4;&amp;#x4EF6;&amp;#x65F6;&amp;#xFF0C;&amp;#x6709;&amp;#x4E00;&amp;#x4E2A;&amp;#">
<meta property="og:locale" content="default">
<meta property="og:image" content="https://bigbigdreamer.github.io/b3f9b7dd/modal.png">
<meta property="og:updated_time" content="2019-01-20T15:29:57.835Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="iview之Modal(render详解)">
<meta name="twitter:description" content="&amp;#x524D;&amp;#x8A00; &amp;#x5148;&amp;#x6765;&amp;#x8BF4;&amp;#x4E00;&amp;#x8BF4;&amp;#x9700;&amp;#x6C42;&amp;#x5427;&amp;#xFF01;   &amp;#x5728;&amp;#x4F7F;&amp;#x7528;iview&amp;#x4E2D;&amp;#x7684;Modal&amp;#x7EC4;&amp;#x4EF6;&amp;#x65F6;&amp;#xFF0C;&amp;#x6709;&amp;#x4E00;&amp;#x4E2A;&amp;#">
<meta name="twitter:image" content="https://bigbigdreamer.github.io/b3f9b7dd/modal.png">
  
  
    <link rel="icon" href="favicon.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  <script src="/js/pace.min.js"></script>
  

  
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?490c72c80e7c5f485272ffc6d84c956b";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>

  

  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>
  <meta name="google-site-verification" content="2yIvO7JmvHMSNv3topeJQ8rrtv6HN-mKjYLR5sdxeaQ">
</head>
</html>
<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">BigDreamer</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a href="/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>Archives</span>
                    </a>
                    
                    <a href="/about">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/logo.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        BigDreamer
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        情不知所起，一往而深。
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="EricWang" target="_blank" href="//ivu1314.club">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="https://github.com/bigbigDreamer">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                        <a title="QQ" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1826001146&site=qq&menu=yes">
                            <i class="fa fa-qq fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-modal" class="article article-type-post" itemscope="" itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      iview之Modal(render详解)
    </h1>
    <div class="post-title-bar">
      <ul>
          
        <li>
          <i class="fa fa-calendar"></i>  2019-01-20
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <h2 id="&#x524D;&#x8A00;"><a href="#&#x524D;&#x8A00;" class="headerlink" title="&#x524D;&#x8A00;"></a>&#x524D;&#x8A00;</h2><blockquote>
<p>&#x5148;&#x6765;&#x8BF4;&#x4E00;&#x8BF4;&#x9700;&#x6C42;&#x5427;&#xFF01;</p>
</blockquote>
<blockquote>
<p>&#x5728;&#x4F7F;&#x7528;iview&#x4E2D;&#x7684;Modal&#x7EC4;&#x4EF6;&#x65F6;&#xFF0C;&#x6709;&#x4E00;&#x4E2A;&#x9700;&#x6C42;&#x5C31;&#x662F;&#x81EA;&#x5B9A;&#x4E49;Modal&#x5185;&#x5BB9;&#xFF0C;&#x4F46;&#x662F;&#xFF0C;&#x6211;&#x8FD8;&#x60F3;&#x66F4;&#x6362;Modal&#x7684;&#x6309;&#x94AE;&#x6587;&#x5B57;&#x3002;</p>
</blockquote>
<h2 id="&#x65B9;&#x6848;"><a href="#&#x65B9;&#x6848;" class="headerlink" title="&#x65B9;&#x6848;"></a>&#x65B9;&#x6848;</h2><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">this</span>.$Modal.confirm({</span><br><span class="line">                   okText: <span class="string">&apos;&#x4FDD;&#x5B58;&apos;</span>,</span><br><span class="line">                   cancelText: <span class="string">&apos;&#x76F4;&#x63A5;&#x8FDB;&#x5165;&#x5B66;&#x4E60;&apos;</span>,</span><br><span class="line">                   render: <span class="function">(<span class="params">h</span>) =&gt;</span> {</span><br><span class="line">                       <span class="keyword">return</span> h(<span class="string">&apos;div&apos;</span>, [</span><br><span class="line">                           h(<span class="string">&apos;div&apos;</span>, {</span><br><span class="line">                               props: {},</span><br><span class="line">                               style: {</span><br><span class="line">                                   display: <span class="string">&apos;flex&apos;</span></span><br><span class="line">                               }</span><br><span class="line">                           }, [</span><br><span class="line">                               h(<span class="string">&apos;div&apos;</span>, {</span><br><span class="line">                                       style: {</span><br><span class="line">                                           borderStyle: <span class="string">&apos;solid&apos;</span>,</span><br><span class="line">                                           borderWidth: <span class="string">&apos;2px&apos;</span>,</span><br><span class="line">                                           borderColor: <span class="string">&apos;#5cb85c&apos;</span>,</span><br><span class="line">                                           borderRadius: <span class="string">&quot;50%&quot;</span>,</span><br><span class="line">                                           width: <span class="string">&apos;40px&apos;</span>,</span><br><span class="line">                                           height: <span class="string">&apos;40px&apos;</span>,</span><br><span class="line">                                           marginBottom: <span class="string">&apos;18px&apos;</span>,</span><br><span class="line">                                       },</span><br><span class="line">                                   }, [</span><br><span class="line">                                       h(<span class="string">&apos;Icon&apos;</span>, {</span><br><span class="line">                                           props: {</span><br><span class="line">                                               type: <span class="string">&quot;ios-checkmark&quot;</span>,</span><br><span class="line">                                               size: <span class="string">&apos;40&apos;</span>,</span><br><span class="line">                                           },</span><br><span class="line">                                           style: {</span><br><span class="line">                                               color: <span class="string">&quot;#5cb85c&quot;</span>,</span><br><span class="line">                                           }</span><br><span class="line">                                       }),</span><br><span class="line">                                   ]</span><br><span class="line">                               ),</span><br><span class="line">                               h(<span class="string">&apos;span&apos;</span>, {</span><br><span class="line">                                   domProps: {</span><br><span class="line">                                       innerHTML: <span class="string">&apos;&#x62A5;&#x540D;&#x6210;&#x529F;&apos;</span>,</span><br><span class="line">                                   },</span><br><span class="line">                                   style: {</span><br><span class="line">                                       color: <span class="string">&quot;#5cb85c&quot;</span>,</span><br><span class="line">                                       marginLeft: <span class="string">&apos;18px&apos;</span>,</span><br><span class="line">                                       fontSize: <span class="string">&apos;22px&apos;</span></span><br><span class="line"></span><br><span class="line">                                   }</span><br><span class="line">                               })</span><br><span class="line">                           ],),</span><br><span class="line">                           h(<span class="string">&apos;div&apos;</span>, {</span><br><span class="line">                               domProps: {</span><br><span class="line">                                   innerHTML: <span class="string">&apos;&#x91CD;&#x8981;&#x7684;&#x8BFE;&#x7A0B;&#x63D0;&#x9192;&#x5C06;&#x901A;&#x8FC7;&#x90AE;&#x4EF6;&#x901A;&#x77E5;&#xFF0C;&#x8BF7;&#x586B;&#x5199;&#x5E38;&#x7528;&#x90AE;&#x7BB1;&#xFF1A;&apos;</span>,</span><br><span class="line">                               },</span><br><span class="line">                           }),</span><br><span class="line">                           h(<span class="string">&apos;Input&apos;</span>, {</span><br><span class="line">                               props: {</span><br><span class="line">                                   value: <span class="keyword">this</span>.email,</span><br><span class="line">                                   autofocus: <span class="literal">true</span>,</span><br><span class="line">                                   placeholder: <span class="string">&apos;&#x8BF7;&#x8F93;&#x5165;&#x4F60;&#x7684;&#x90AE;&#x7BB1;&apos;</span>,</span><br><span class="line">                               },</span><br><span class="line">                               style: {</span><br><span class="line">                                   marginTop: <span class="string">&apos;18px&apos;</span>,</span><br><span class="line">                                   width: <span class="string">&apos;200px&apos;</span></span><br><span class="line">                               },</span><br><span class="line">                               on: {</span><br><span class="line">                                   input: <span class="function">(<span class="params">val</span>) =&gt;</span> {</span><br><span class="line">                                       <span class="keyword">this</span>.email = val;</span><br><span class="line">                                   }</span><br><span class="line">                               }</span><br><span class="line">                           }),</span><br><span class="line"></span><br><span class="line">                       ])</span><br><span class="line">                   }</span><br><span class="line">               }, {</span><br><span class="line">                   okText: <span class="string">&apos;&#x4FDD;&#x5B58;&apos;</span></span><br><span class="line">               })</span><br></pre></td></tr></tbody></table></figure>
<h2 id="Render&#x63A2;&#x7D22;"><a href="#Render&#x63A2;&#x7D22;" class="headerlink" title="Render&#x63A2;&#x7D22;"></a>Render&#x63A2;&#x7D22;</h2><h4 id="Render&#x683C;&#x5F0F;"><a href="#Render&#x683C;&#x5F0F;" class="headerlink" title="Render&#x683C;&#x5F0F;"></a>Render&#x683C;&#x5F0F;</h4><figure class="highlight javascript"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">render:<span class="function">(<span class="params">h</span>) =&gt;</span>{</span><br><span class="line">    <span class="keyword">return</span> h(<span class="string">&apos;ParentNode&apos;</span>,{</span><br><span class="line">        <span class="comment">//some config </span></span><br><span class="line">        <span class="comment">//example props attri domProps style  and so on</span></span><br><span class="line">    },[</span><br><span class="line">        <span class="comment">//childNode</span></span><br><span class="line">        <span class="comment">//the form as parent you can see </span></span><br><span class="line">    ])</span><br><span class="line">}</span><br></pre></td></tr></tbody></table></figure>
<blockquote>
<p>&#x5F53;&#x7136;&#xFF0C;&#x4F60;&#x4E5F;&#x53EF;&#x4EE5;&#x5C42;&#x5C42;&#x5D4C;&#x5957;&#x3002;</p>
</blockquote>
<h2 id="JSX"><a href="#JSX" class="headerlink" title="JSX"></a>JSX</h2><blockquote>
<p>&#x60F3;&#x8D77;JSX&#x6211;&#x5C31;&#x4F1A;&#x60F3;&#x8D77;react&#x7684;&#x7EC4;&#x4EF6;&#x5199;&#x6CD5;&#xFF0C;&#x662F;&#x7684;&#xFF0C;&#x5F88;&#x8212;&#x670D;&#x3002;</p>
</blockquote>
<figure class="highlight jsx"><figcaption><span>harmony</span></figcaption><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// you can writer it as this form </span></span><br><span class="line"> render: <span class="function"><span class="keyword">function</span> (<span class="params">h</span>) </span>{</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">      &lt;AnchoredHeading level={<span class="number">1</span>}&gt;</span><br><span class="line">        &lt;span&gt;Hello&lt;<span class="regexp">/span&gt; world!</span></span><br><span class="line"><span class="regexp">      &lt;/</span>AnchoredHeading&gt;</span><br><span class="line">    )</span><br><span class="line">  }</span><br></pre></td></tr></tbody></table></figure>
<h2 id="&#x6536;&#x83B7;"><a href="#&#x6536;&#x83B7;" class="headerlink" title="&#x6536;&#x83B7;"></a>&#x6536;&#x83B7;</h2><blockquote>
<p>&#x5728;&#x505A;&#x9879;&#x76EE;&#x4E2D;&#x6700;&#x5927;&#x7684;&#x6536;&#x83B7;&#x5C31;&#x662F;&#x6536;&#x83B7;&#x4E86;&#x5F88;&#x591A;&#x7684;&#x5B9E;&#x9645;&#x7ECF;&#x9A8C;&#xFF0C;&#x8FD9;&#x662F;&#x5728;&#x5B66;&#x4E60;&#x4EE5;&#x53CA;&#x8001;&#x5E08;&#x6559;&#x4E0D;&#x5230;&#x7684;&#xFF0C;&#x540C;&#x6837;&#x4E5F;&#x5B66;&#x4F1A;&#x4E86;&#x5F88;&#x591A;&#x95EE;&#x9898;&#x7684;&#x5904;&#x7406;&#x65B9;&#x5F0F;&#x3002;</p>
</blockquote>
<blockquote>
<p>&#x4E00;&#x6837;&#x7684;&#xFF0C;&#x7ED3;&#x5C3E;&#x9644;&#x4E0A;&#x6211;&#x7684;&#x95EE;&#x9898;&#x89E3;&#x51B3;&#x6210;&#x679C;&#x3002;</p>
</blockquote>
<p><img src="/b3f9b7dd/modal.png" alt="alt"></p>
<script>
        document.querySelectorAll('.github-emoji')
          .forEach(el => {
            if (!el.dataset.src) { return; }
            const img = document.createElement('img');
            img.style = 'display:none !important;';
            img.src = el.dataset.src;
            img.addEventListener('error', () => {
              img.remove();
              el.style.color = 'inherit';
              el.style.backgroundImage = 'none';
              el.style.background = 'none';
            });
            img.addEventListener('load', () => {
              img.remove();
            });
            document.body.appendChild(img);
          });
      </script>
            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2019年01月20日 23:29</p>
        <p>原始链接： <a class="post-url" href="/b3f9b7dd.html" title="iview之Modal(render详解)">https://bigbigdreamer.github.io/b3f9b7dd.html</a></p>
        <footer>
            <a href="https://bigbigdreamer.github.io">
                <img src="/images/logo.jpg" alt="">
                
            </a>
        </footer>
    </div>
</div>

      
        
            
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;">赏</a>
</div>

<div id="reward" class="post-modal reward-lay">
    <a class="close" href="javascript:;" id="reward-close">×</a>
    <span class="reward-title">
        <i class="icon icon-quote-left"></i>
        请我吃糖~
        <i class="icon icon-quote-right"></i>
    </span>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/images/wechat_code.jpg" alt="打赏二维码">
        </div>
        <div class="reward-select">
            
            <label class="reward-select-item checked" data-id="wechat" data-wechat="/images/wechat_code.jpg">
                <img class="reward-select-item-wechat" src="/images/wechat.png" alt="微信">
            </label>
            
            
            <label class="reward-select-item" data-id="alipay" data-alipay="/images/alipay_code.jpg">
                <img class="reward-select-item-alipay" src="/images/alipay.png" alt="支付宝">
            </label>
            
        </div>
    </div>
</div>


        
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://bigbigdreamer.github.io/b3f9b7dd.html&title=《iview之Modal(render详解)》 — null&pic=https://bigbigdreamer.github.ioimages/logo.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://bigbigdreamer.github.io/b3f9b7dd.html&title=《iview之Modal(render详解)》 — null&source=" data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://bigbigdreamer.github.io/b3f9b7dd.html" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《iview之Modal(render详解)》 — null&url=https://bigbigdreamer.github.io/b3f9b7dd.html&via=https://bigbigdreamer.github.io" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://bigbigdreamer.github.io/b3f9b7dd.html" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://bigbigdreamer.github.io/b3f9b7dd.html" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/iview/" class="color1">iview</a>
      
    <a href="/tags/Modal/" class="color1">Modal</a>
      
    <a href="/tags/Render/" class="color2">Render</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>


    <aside class="post-toc-pos post-toc-top" id="post-toc">
        <nav class="post-toc-wrap">
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#前言"><span class="post-toc-text">前言</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#方案"><span class="post-toc-text">方案</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#Render探索"><span class="post-toc-text">Render探索</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Render格式"><span class="post-toc-text">Render格式</span></a></li></ol></li></ol><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#JSX"><span class="post-toc-text">JSX</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#收获"><span class="post-toc-text">收获</span></a></li>
        </nav>
    </aside>
    

<nav id="article-nav">
  
    <a href="/729b34d2.html" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          iview之Collapse踩坑记
        
      </span>
    </a>
  
  
    <a href="/6fda49e5.html" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">新的一年，新的起点</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
        <div id="SOHUCS" sid="modal"></div>
<script type="text/javascript">
    (function(){
        var appid = 'cytVQxp6s';
        var conf = 'prod_8686c5c96a3bc67353ba410e4bcb37a9';
        var width = window.innerWidth || document.documentElement.clientWidth;
        if (width < 960) {
            window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })(); </script>
    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style="display:none">
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style="display:none">
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
        Powered by  <a href="http://hexo.io/" target="_blank">Hexo</a>
        Theme <a href="//github.com/wongminho/hexo-theme-miho" target="_blank">MiHo</a>
      &copy; 2019 <br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "https://bigbigdreamer.github.io",
      animate: true,
      isHome: false,
      share: true,
      reward: 1
  }
</script>
<div class="sidebar">
    <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div>
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/categories/CSS/">CSS</a><a class="category-link" href="/categories/ES6/">ES6</a><a class="category-link" href="/categories/Linux/">Linux</a><a class="category-link" href="/categories/Node/">Node</a><a class="category-link" href="/categories/Vue/">Vue</a><a class="category-link" href="/categories/Vue-Router/">Vue-Router</a><a class="category-link" href="/categories/ajax/">ajax</a><a class="category-link" href="/categories/前端接口调试/">前端接口调试</a><a class="category-link" href="/categories/杂货/">杂货</a><a class="category-link" href="/categories/经验/">经验</a><a class="category-link" href="/categories/设计模式/">设计模式</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/Async/" style="font-size: 10px;">Async</a> <a href="/tags/Babel-7-0/" style="font-size: 10px;">Babel 7.0</a> <a href="/tags/CSS/" style="font-size: 10px;">CSS</a> <a href="/tags/CSS3/" style="font-size: 10px;">CSS3</a> <a href="/tags/CSS样式/" style="font-size: 10px;">CSS样式</a> <a href="/tags/Collapse/" style="font-size: 10px;">Collapse</a> <a href="/tags/DMZ/" style="font-size: 10px;">DMZ</a> <a href="/tags/DOM/" style="font-size: 10px;">DOM</a> <a href="/tags/ES6/" style="font-size: 17.5px;">ES6</a> <a href="/tags/EXT/" style="font-size: 10px;">EXT</a> <a href="/tags/FAT/" style="font-size: 10px;">FAT</a> <a href="/tags/Function/" style="font-size: 10px;">Function</a> <a href="/tags/HTML5/" style="font-size: 10px;">HTML5</a> <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/JS/" style="font-size: 10px;">JS</a> <a href="/tags/JS模块化/" style="font-size: 10px;">JS模块化</a> <a href="/tags/JavaScript/" style="font-size: 10px;">JavaScript</a> <a href="/tags/Less/" style="font-size: 10px;">Less</a> <a href="/tags/Linux/" style="font-size: 10px;">Linux</a> <a href="/tags/MarkDown/" style="font-size: 10px;">MarkDown</a> <a href="/tags/Modal/" style="font-size: 10px;">Modal</a> <a href="/tags/Node/" style="font-size: 10px;">Node</a> <a href="/tags/Promise/" style="font-size: 12.5px;">Promise</a> <a href="/tags/Render/" style="font-size: 10px;">Render</a> <a href="/tags/Sync/" style="font-size: 10px;">Sync</a> <a href="/tags/Template/" style="font-size: 10px;">Template</a> <a href="/tags/Vue/" style="font-size: 20px;">Vue</a> <a href="/tags/WebStorm/" style="font-size: 10px;">WebStorm</a> <a href="/tags/ajax/" style="font-size: 10px;">ajax</a> <a href="/tags/axios/" style="font-size: 10px;">axios</a> <a href="/tags/bat文件/" style="font-size: 10px;">bat文件</a> <a href="/tags/dos/" style="font-size: 10px;">dos</a> <a href="/tags/es6/" style="font-size: 10px;">es6</a> <a href="/tags/exports/" style="font-size: 10px;">exports</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/github/" style="font-size: 10px;">github</a> <a href="/tags/iview/" style="font-size: 15px;">iview</a> <a href="/tags/module-exports/" style="font-size: 10px;">module.exports</a> <a href="/tags/newTarget/" style="font-size: 10px;">newTarget</a> <a href="/tags/newYear/" style="font-size: 10px;">newYear</a> <a href="/tags/nginx/" style="font-size: 10px;">nginx</a> <a href="/tags/node/" style="font-size: 10px;">node</a> <a href="/tags/postman/" style="font-size: 10px;">postman</a> <a href="/tags/queue/" style="font-size: 10px;">queue</a> <a href="/tags/scope/" style="font-size: 10px;">scope</a> <a href="/tags/scroll/" style="font-size: 10px;">scroll</a> <a href="/tags/vue/" style="font-size: 15px;">vue</a> <a href="/tags/vue-cli3-0/" style="font-size: 10px;">vue @cli3.0</a> <a href="/tags/vue-cli3-0/" style="font-size: 10px;">vue-cli3.0</a> <a href="/tags/vue-router/" style="font-size: 10px;">vue-router</a> <a href="/tags/webpack/" style="font-size: 10px;">webpack</a> <a href="/tags/一曲相思/" style="font-size: 10px;">一曲相思</a> <a href="/tags/优化体验/" style="font-size: 10px;">优化体验</a> <a href="/tags/单例模式/" style="font-size: 10px;">单例模式</a> <a href="/tags/双大括号表达式/" style="font-size: 10px;">双大括号表达式</a> <a href="/tags/域名/" style="font-size: 10px;">域名</a> <a href="/tags/富文本编辑器/" style="font-size: 10px;">富文本编辑器</a> <a href="/tags/封装/" style="font-size: 10px;">封装</a> <a href="/tags/开发环境/" style="font-size: 10px;">开发环境</a> <a href="/tags/心情/" style="font-size: 10px;">心情</a> <a href="/tags/心灵驿站/" style="font-size: 10px;">心灵驿站</a> <a href="/tags/情感/" style="font-size: 10px;">情感</a> <a href="/tags/搜狐畅言/" style="font-size: 10px;">搜狐畅言</a> <a href="/tags/数据结构/" style="font-size: 10px;">数据结构</a> <a href="/tags/日常修仙/" style="font-size: 10px;">日常修仙</a> <a href="/tags/服务器数据Mock/" style="font-size: 10px;">服务器数据Mock</a> <a href="/tags/杂货/" style="font-size: 10px;">杂货</a> <a href="/tags/柯里化/" style="font-size: 10px;">柯里化</a> <a href="/tags/气泡提示/" style="font-size: 10px;">气泡提示</a> <a href="/tags/生产环境/" style="font-size: 10px;">生产环境</a> <a href="/tags/简单工厂模式/" style="font-size: 10px;">简单工厂模式</a> <a href="/tags/腾讯云/" style="font-size: 10px;">腾讯云</a> <a href="/tags/设计模式/" style="font-size: 12.5px;">设计模式</a> <a href="/tags/调试/" style="font-size: 10px;">调试</a> <a href="/tags/跨域/" style="font-size: 10px;">跨域</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div class="mobile-header-menu-container">
        <span class="title">Menus</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a href="/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a href="/archives">
                    <i class="fa fa-archive"></i><span>Archives</span>
                </a>
            </li>
            
            <li>
                <a href="/about">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="mobile-header-tag-container">
        <span class="title">Tags</span>
        <div id="mobile-header-container-tags">
            <a href="/tags/Async/" style="font-size: 10px;">Async</a> <a href="/tags/Babel-7-0/" style="font-size: 10px;">Babel 7.0</a> <a href="/tags/CSS/" style="font-size: 10px;">CSS</a> <a href="/tags/CSS3/" style="font-size: 10px;">CSS3</a> <a href="/tags/CSS样式/" style="font-size: 10px;">CSS样式</a> <a href="/tags/Collapse/" style="font-size: 10px;">Collapse</a> <a href="/tags/DMZ/" style="font-size: 10px;">DMZ</a> <a href="/tags/DOM/" style="font-size: 10px;">DOM</a> <a href="/tags/ES6/" style="font-size: 17.5px;">ES6</a> <a href="/tags/EXT/" style="font-size: 10px;">EXT</a> <a href="/tags/FAT/" style="font-size: 10px;">FAT</a> <a href="/tags/Function/" style="font-size: 10px;">Function</a> <a href="/tags/HTML5/" style="font-size: 10px;">HTML5</a> <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/JS/" style="font-size: 10px;">JS</a> <a href="/tags/JS模块化/" style="font-size: 10px;">JS模块化</a> <a href="/tags/JavaScript/" style="font-size: 10px;">JavaScript</a> <a href="/tags/Less/" style="font-size: 10px;">Less</a> <a href="/tags/Linux/" style="font-size: 10px;">Linux</a> <a href="/tags/MarkDown/" style="font-size: 10px;">MarkDown</a> <a href="/tags/Modal/" style="font-size: 10px;">Modal</a> <a href="/tags/Node/" style="font-size: 10px;">Node</a> <a href="/tags/Promise/" style="font-size: 12.5px;">Promise</a> <a href="/tags/Render/" style="font-size: 10px;">Render</a> <a href="/tags/Sync/" style="font-size: 10px;">Sync</a> <a href="/tags/Template/" style="font-size: 10px;">Template</a> <a href="/tags/Vue/" style="font-size: 20px;">Vue</a> <a href="/tags/WebStorm/" style="font-size: 10px;">WebStorm</a> <a href="/tags/ajax/" style="font-size: 10px;">ajax</a> <a href="/tags/axios/" style="font-size: 10px;">axios</a> <a href="/tags/bat文件/" style="font-size: 10px;">bat文件</a> <a href="/tags/dos/" style="font-size: 10px;">dos</a> <a href="/tags/es6/" style="font-size: 10px;">es6</a> <a href="/tags/exports/" style="font-size: 10px;">exports</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/github/" style="font-size: 10px;">github</a> <a href="/tags/iview/" style="font-size: 15px;">iview</a> <a href="/tags/module-exports/" style="font-size: 10px;">module.exports</a> <a href="/tags/newTarget/" style="font-size: 10px;">newTarget</a> <a href="/tags/newYear/" style="font-size: 10px;">newYear</a> <a href="/tags/nginx/" style="font-size: 10px;">nginx</a> <a href="/tags/node/" style="font-size: 10px;">node</a> <a href="/tags/postman/" style="font-size: 10px;">postman</a> <a href="/tags/queue/" style="font-size: 10px;">queue</a> <a href="/tags/scope/" style="font-size: 10px;">scope</a> <a href="/tags/scroll/" style="font-size: 10px;">scroll</a> <a href="/tags/vue/" style="font-size: 15px;">vue</a> <a href="/tags/vue-cli3-0/" style="font-size: 10px;">vue @cli3.0</a> <a href="/tags/vue-cli3-0/" style="font-size: 10px;">vue-cli3.0</a> <a href="/tags/vue-router/" style="font-size: 10px;">vue-router</a> <a href="/tags/webpack/" style="font-size: 10px;">webpack</a> <a href="/tags/一曲相思/" style="font-size: 10px;">一曲相思</a> <a href="/tags/优化体验/" style="font-size: 10px;">优化体验</a> <a href="/tags/单例模式/" style="font-size: 10px;">单例模式</a> <a href="/tags/双大括号表达式/" style="font-size: 10px;">双大括号表达式</a> <a href="/tags/域名/" style="font-size: 10px;">域名</a> <a href="/tags/富文本编辑器/" style="font-size: 10px;">富文本编辑器</a> <a href="/tags/封装/" style="font-size: 10px;">封装</a> <a href="/tags/开发环境/" style="font-size: 10px;">开发环境</a> <a href="/tags/心情/" style="font-size: 10px;">心情</a> <a href="/tags/心灵驿站/" style="font-size: 10px;">心灵驿站</a> <a href="/tags/情感/" style="font-size: 10px;">情感</a> <a href="/tags/搜狐畅言/" style="font-size: 10px;">搜狐畅言</a> <a href="/tags/数据结构/" style="font-size: 10px;">数据结构</a> <a href="/tags/日常修仙/" style="font-size: 10px;">日常修仙</a> <a href="/tags/服务器数据Mock/" style="font-size: 10px;">服务器数据Mock</a> <a href="/tags/杂货/" style="font-size: 10px;">杂货</a> <a href="/tags/柯里化/" style="font-size: 10px;">柯里化</a> <a href="/tags/气泡提示/" style="font-size: 10px;">气泡提示</a> <a href="/tags/生产环境/" style="font-size: 10px;">生产环境</a> <a href="/tags/简单工厂模式/" style="font-size: 10px;">简单工厂模式</a> <a href="/tags/腾讯云/" style="font-size: 10px;">腾讯云</a> <a href="/tags/设计模式/" style="font-size: 12.5px;">设计模式</a> <a href="/tags/调试/" style="font-size: 10px;">调试</a> <a href="/tags/跨域/" style="font-size: 10px;">跨域</a>
        </div>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/js/search.js"></script>
<script src="/js/main.js"></script>


  <script src="//cdn.bootcss.com/particles.js/2.0.0/particles.min.js"></script>
  <div id="particles"></div>
  <script src="/js/particles.js"></script>







  <link rel="stylesheet" href="//cdn.bootcss.com/animate.css/3.5.0/animate.min.css">
  <script src="//cdn.bootcss.com/scrollReveal.js/3.0.5/scrollreveal.js"></script>
  <script src="/js/animate.js"></script>


  <script src="/js/pop-img.js"></script>
  <script>
     $(".article-entry p img").popImg();
  </script>

  </div>
</body>
</html>